<!--
 * @Author: CHINAKAIYUAN<sunkaiyuan@namenode.cn>
 * @Date: 2022-02-03 14:41:20
 * @LastEditTime: 2023-10-29 13:43:04
 * @LastEditors: 孙开源 && sunkaiyuan@namenode.cn
 * @Description:   :gridOps="gridOptions" 
-->
<template>
	<sc-VxeTable
		:gridEvts="gridEvents"
		:tablecode="'storage_query_dye'"
		:gridOps="gridOps"
		:url="this.$API.storage.storage.list"
		:params="[
			{
				location_id: 512,
			},
		]"
	>
	</sc-VxeTable>
	<list-dialog
		v-if="dialog"
		ref="saveDialog"
		@closed="dialog = false"
		:params="list_params"
	></list-dialog>
</template>
<script>
import { ref, nextTick } from "vue";
import listDialog from "./../list";
// import { VXETable } from 'vxe-table';
export default {
	components: { listDialog },
	name: "storage_query_dyeweigh",
	setup() {
		const list_params = ref({});
		const dialog = ref(false);
		const saveDialog = ref({});
		const gridEvents = ref({
			cellDblclick: function ({ row }) {
				dialog.value = true;
				list_params.value = { summary_storage_id: row.id };
				nextTick(() => {
					saveDialog.value.open();
				});
			},
		});
		//
		const gridOps = {
			columns: [
				{
					field: "available_auxiliary_quantity",
					className: "blue",
				},
				{
					field: "available_quantity",
					className: "blue",
				},
				{
					field: "occupy_auxiliary_quantity",
					className: "red",
				},
				{
					field: "occupy_quantity",
					className: "red",
				},
			],
		};
		return {
			gridEvents,
			list_params,
			dialog,
			saveDialog,
			gridOps,
		};
	},
};
</script>
